package com.zhangwei.day38.bean;

import android.database.Cursor;

import com.lidroid.xutils.db.annotation.Column;
import com.lidroid.xutils.db.annotation.Id;
import com.lidroid.xutils.db.annotation.Table;
import com.zhangwei.day38.dao.DbBean;

import java.io.Serializable;

/**
 * @author zhangwei
 * @version V1.0
 * @Title: Advanced
 * @Package com.zhangwei.day38.bean
 * @Description:
 * @date 15/10/20 下午2:25
 */


@Table(name = "USER")
public class User implements Serializable {
    @Id
    private long id;
    @Column(column = "NAME")
    private String name;
    @Column(column = "pwd", defaultValue = "123456")
    private String pwd;


    public User() {
    }


    public User(Cursor cursor) {
        name = cursor.getString(cursor.getColumnIndex(DbBean.UserDb.name));
        pwd = cursor.getString(cursor.getColumnIndex(DbBean.UserDb.pwd));
    }


    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }
}
